package com.botao.tip.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.botao.tip.dao.LoginCountMapper;
import com.botao.tip.dao.ProductMapper;
import com.botao.tip.entity.LoginCount;
import com.botao.tip.entity.Product;
import com.botao.tip.service.LoginCountService;
import com.botao.tip.service.ProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @author : vip865047755@126.com
 * @version :JDK1.8
 * @date : 2020-12-04 22:04
 * @File : LoginCountServiceImpl.java
 * @software: IntelliJ IDEA
 */
@Service
@Transactional(rollbackFor = Exception.class)
public class LoginCountServiceImpl extends ServiceImpl<LoginCountMapper, LoginCount> implements LoginCountService {

    @Autowired
    private LoginCountMapper loginCountMapper;

    @Override
    public List<LoginCount> queryByTime(String result) {
        return loginCountMapper.queryByTime(result);
    }

    @Override
    public int insertCount(LoginCount loginCount) {
        return loginCountMapper.insertCount(loginCount);
    }

    @Override
    public int updateCount(int count) {
        return loginCountMapper.selectOneByTime(count);
    }

    @Override
    public LoginCount queryByTimeOne(String result) {
        return null;
    }
}
